package cn.gjxblog.service;

import cn.gjxblog.model.dto.HouseQueryDTO;
import cn.gjxblog.model.entity.City;
import cn.gjxblog.model.entity.Community;
import cn.gjxblog.model.entity.House;
import cn.gjxblog.model.entity.HouseMsg;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2018/12/12 16:08
 */
public interface HouseService  {
    PageInfo searchHouses(HouseQueryDTO houseQueryDTO);


    House getHouse(String id);


    List<Community> queryCommunitys();

    List<City> queryCitys();

    void addHouse(House house, String userId);

    PageInfo<House> queryHousesByUserId(HouseQueryDTO houseQueryDTO);

    void addHouseMsg(HouseMsg houseMsg);

    void updateRating(String id, Double rating);

    void addUser2House(String houseId, String userId,Integer type);

    void deleteUser2House(String houseId,String userId,Integer type);

    void deleteHouse(String houseId);
}
